package com.xuwenjin.basic_juc;

public class TestJoin  implements Runnable{
    public static void main(String[] args) throws InterruptedException {
        TestJoin testJoin = new TestJoin();
        Thread thread = new Thread(testJoin);
        thread.start();
        for (int i = 0; i < 10000; i++) {
            System.out.println(i);
            if (i == 5000) {
                thread.join();

            }
        }
    }

    @Override
    public void run() {
        for (int i = 0; i < 1000; i++) {
            System.out.println("vip");
        }
    }
}

